#ifndef INTEGERSET_H
#define INTEGERSET_H

#include <set>
#include <iostream>
#include <algorithm>
#include <iterator>
using namespace std;

class IntegerSet 
{
public:
    IntegerSet ();
    IntegerSet (int[], size_t);

    IntegerSet unionOfSets (const IntegerSet &) const;
    IntegerSet intersectionOfSets (const IntegerSet &) const;

    void emptySet ();
    void inputSet (istream & = std::cin);
    void insertElement (int);
    void deleteElement (int);

    void printSet (ostream & = std::cout) const;
    bool isEqualTo (const IntegerSet &) const;

private:
    typedef std::set<int> set_t;
    set_t m_set;
};

const IntegerSet operator& (const IntegerSet &, const IntegerSet &);
const IntegerSet operator| (const IntegerSet &, const IntegerSet &);
bool operator== (const IntegerSet &, const IntegerSet &);
bool operator!= (const IntegerSet &, const IntegerSet &);
ostream & operator<< (ostream &, const IntegerSet &);
istream & operator>> (istream &, IntegerSet &);
IntegerSet & operator<< (IntegerSet &, int);

#endif /* end of include guard: INTEGERSET_H */
